<?php
class Config{
	/**
	 * 设置数据库配置
	 * host		连接地址
	 * port		端口号
	 * username	用户名
	 * password	密码
	 */
	static $dbconfigs = array(
		'sk_cms'=>array(
			'w'=>array('host'=>'192.168.1.36','port'=>'3306','user'=>'root','pwd'=>'root'),//权限：写、改、删
			'r'=>array('host'=>'192.168.1.36','port'=>'3306','user'=>'root','pwd'=>'root')//权限：读
		),
		'sk_material'=>array(
			'w'=>array('host'=>'192.168.1.36','port'=>'3306','user'=>'root','pwd'=>'root'),//权限：写、改、删
			'r'=>array('host'=>'192.168.1.36','port'=>'3306','user'=>'root','pwd'=>'root')//权限：读
		),
		'sk_kf'=>array(
			'w'=>array('host'=>'192.168.1.36','port'=>'3306','user'=>'root','pwd'=>'root'),//权限：写、改、删
			'r'=>array('host'=>'192.168.1.36','port'=>'3306','user'=>'root','pwd'=>'root')//权限：读
		),
	);
	
	/**
	 * 取得数据库配置
	 * dbname	库名
	 */
	static function db($dbname){
		$config = self::$dbconfigs[$dbname];
		return $config;
	}
}
/**********************************文件已结束**************************************************/